package com.yugao.fintech.antelope.shop.feign;

import com.alibaba.cloud.nacos.NacosServiceAutoConfiguration;
import com.yugao.fintech.antelope.base.model.constants.SecurityCons;
import com.yugao.fintech.antelope.base.model.constants.ServiceCodeCons;
import com.yugao.fintech.antelope.base.model.module.auth.LoginUser;
import com.yugao.fintech.antelope.system.model.rqrs.log.LoginUserGetReq;
import com.yugao.fintech.framework.core.response.Resp;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.cloud.openfeign.FeignAutoConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;


@FeignClient(contextId = "UmsUserClient", value = ServiceCodeCons.PORTAL_SERVICE)
@ConditionalOnClass({FeignAutoConfiguration.class, NacosServiceAutoConfiguration.class})
public interface FumUserClient {

    /**
     * 通过账号查询用户信息
     * @return 结果
     */
    @PostMapping(value = "/fum/user/getLoginUser", headers = SecurityCons.HEADER_FROM_IN)
    Resp<LoginUser> getLoginUser(@RequestBody LoginUserGetReq req);

}
